﻿
@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>OnWordSelectionChange的使用</title>
</head>
<body style="overflow:hidden">
    <div style="font-size: 12px; line-height: 20px; border-bottom: dotted 1px #ccc; border-top: dotted 1px #ccc; padding: 5px;">
        <span style="color: red;">操作说明：请选中文档中一段内容进行测试。</span>
    </div>
    <br />
    <script type="text/javascript">
        function OnWordSelectionChange() {
            var obj = document.getElementById("PageOfficeCtrl1").Document.Application.Selection;
            if (obj.Range.Text != "") {
                alert(obj.Range.Text);
            }
        }
    </script>
    <div id="POCont" style="width: auto;height: 800px;">
        @Html.Raw(ViewBag.POCtrl)
    </div>

</body>
</html>
